package shake.jsf;

import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.el.ELContextListener;
import javax.el.ELException;
import javax.el.ELResolver;
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
import javax.faces.application.NavigationHandler;
import javax.faces.application.StateManager;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;
import javax.faces.el.PropertyResolver;
import javax.faces.el.ReferenceSyntaxException;
import javax.faces.el.ValueBinding;
import javax.faces.el.VariableResolver;
import javax.faces.event.ActionListener;
import javax.faces.validator.Validator;

public class ShakeApplication extends Application {
	Application delegate;

	public ShakeApplication(Application deleage) {
		super();
		this.delegate = deleage;
	}

	public void addComponent(String componentType, String componentClass) {
		delegate.addComponent(componentType, componentClass);
	}

	public void addConverter(Class targetClass, String converterClass) {
		delegate.addConverter(targetClass, converterClass);
	}

	public void addConverter(String converterId, String converterClass) {
		delegate.addConverter(converterId, converterClass);
	}

	public void addELContextListener(ELContextListener listener) {
		delegate.addELContextListener(listener);
	}

	public void addELResolver(ELResolver resolver) {
		delegate.addELResolver(resolver);
	}

	public void addValidator(String validatorId, String validatorClass) {
		delegate.addValidator(validatorId, validatorClass);
	}

	public UIComponent createComponent(String componentType)
			throws FacesException {
		return delegate.createComponent(componentType);
	}

	public UIComponent createComponent(ValueBinding componentBinding,
			FacesContext context, String componentType) throws FacesException {
		return delegate.createComponent(componentBinding, context,
				componentType);
	}

	public UIComponent createComponent(ValueExpression componentExpression,
			FacesContext context, String componentType) throws FacesException {
		return delegate.createComponent(componentExpression, context,
				componentType);
	}

	public Converter createConverter(Class targetClass) {
		return delegate.createConverter(targetClass);
	}

	public Converter createConverter(String converterId) {
		return delegate.createConverter(converterId);
	}

	public MethodBinding createMethodBinding(String ref, Class[] params)
			throws ReferenceSyntaxException {
		return delegate.createMethodBinding(ref, params);
	}

	public Validator createValidator(String validatorId) throws FacesException {
		return delegate.createValidator(validatorId);
	}

	public ValueBinding createValueBinding(String ref)
			throws ReferenceSyntaxException {
		return delegate.createValueBinding(ref);
	}

	public boolean equals(Object obj) {
		return delegate.equals(obj);
	}

	public Object evaluateExpressionGet(FacesContext context,
			String expression, Class expectedType) throws ELException {
		return delegate
				.evaluateExpressionGet(context, expression, expectedType);
	}

	public ActionListener getActionListener() {
		return delegate.getActionListener();
	}

	public Iterator<String> getComponentTypes() {
		return delegate.getComponentTypes();
	}

	public Iterator<String> getConverterIds() {
		return delegate.getConverterIds();
	}

	public Iterator<Class> getConverterTypes() {
		return delegate.getConverterTypes();
	}

	public Locale getDefaultLocale() {
		return delegate.getDefaultLocale();
	}

	public String getDefaultRenderKitId() {
		return delegate.getDefaultRenderKitId();
	}

	public ELContextListener[] getELContextListeners() {
		return delegate.getELContextListeners();
	}

	public ELResolver getELResolver() {
		return delegate.getELResolver();
	}

	public ExpressionFactory getExpressionFactory() {
		return new ShakeExpresionFactory(delegate.getExpressionFactory());
	}

	public String getMessageBundle() {
		return delegate.getMessageBundle();
	}

	public NavigationHandler getNavigationHandler() {
		return delegate.getNavigationHandler();
	}

	public PropertyResolver getPropertyResolver() {
		return delegate.getPropertyResolver();
	}

	public ResourceBundle getResourceBundle(FacesContext ctx, String name) {
		return delegate.getResourceBundle(ctx, name);
	}

	public StateManager getStateManager() {
		return delegate.getStateManager();
	}

	public Iterator<Locale> getSupportedLocales() {
		return delegate.getSupportedLocales();
	}

	public Iterator<String> getValidatorIds() {
		return delegate.getValidatorIds();
	}

	public VariableResolver getVariableResolver() {
		return delegate.getVariableResolver();
	}

	public ViewHandler getViewHandler() {
		return delegate.getViewHandler();
	}

	public int hashCode() {
		return delegate.hashCode();
	}

	public void removeELContextListener(ELContextListener listener) {
		delegate.removeELContextListener(listener);
	}

	public void setActionListener(ActionListener listener) {
		delegate.setActionListener(listener);
	}

	public void setDefaultLocale(Locale locale) {
		delegate.setDefaultLocale(locale);
	}

	public void setDefaultRenderKitId(String renderKitId) {
		delegate.setDefaultRenderKitId(renderKitId);
	}

	public void setMessageBundle(String bundle) {
		delegate.setMessageBundle(bundle);
	}

	public void setNavigationHandler(NavigationHandler handler) {
		delegate.setNavigationHandler(handler);
	}

	public void setPropertyResolver(PropertyResolver resolver) {
		delegate.setPropertyResolver(resolver);
	}

	public void setStateManager(StateManager manager) {
		delegate.setStateManager(manager);
	}

	public void setSupportedLocales(Collection<Locale> locales) {
		delegate.setSupportedLocales(locales);
	}

	public void setVariableResolver(VariableResolver resolver) {
		delegate.setVariableResolver(resolver);
	}

	public void setViewHandler(ViewHandler handler) {
		delegate.setViewHandler(handler);
	}

	public String toString() {
		return delegate.toString();
	}

}
